home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / pgs3f.lha / 3.0fUpdate / PostScript.LHA / PostScript.prolog < prev   
Text File  |  1995-02-06  |  25KB  |  863 lines

  1. %%BeginProlog
  2. % $VER: PostScript.prolog 1.0e (02.02.95)
  3. % fixed picstr problem in BeginRGBBitmap (7.10.94)
  4. % added font reencoding support (29.10.94)
  5. % complete change to fill/stroke for support for text (02.02.95)
  6. % fixed landscape to non-letter sizes
  7. %Copyright 1994 Soft-Logik Publishing Corp.
  8.  
  9. /AsphaltDict dup 153 dict def load begin
  10.  
  11. %
  12. % basic definitions
  13. %
  14. /bdef {bind def}bind def
  15. /xdef {exch def}bdef
  16. /ldef {load def}bdef
  17. /dmatrix matrix def
  18. /cmatrix matrix def
  19. /omatrix matrix def
  20.  
  21. /deltax 0 def
  22. /deltay 0 def
  23. /slant 0 def
  24. /twist 0 def
  25. /xscl 0 def
  26. /yscl 0 def
  27. /bang 0 def
  28. /eang 0 def
  29.  
  30. /tilescalex 0 def
  31. /tilescaley 0 def
  32. /bh 0 def
  33. /bv 0 def
  34.  
  35. %
  36. % fill defines
  37. %
  38. /SG /setgray ldef
  39.  
  40. %
  41. % drawing definitions
  42. %
  43. /sclm [0 0 0 0 0 0] def
  44. /sr{/twist xdef /slant xdef /deltay xdef /deltax xdef cmatrix setmatrix deltax deltay translate sclm 0 twist cos put
  45. sclm 1 twist sin put sclm 2 slant sin neg put sclm 3 slant cos put sclm concat /omatrix omatrix currentmatrix def}bdef
  46.  
  47. /scl{deltay sub exch deltax sub exch transform round .2 add exch round .2 add exch itransform}bdef
  48.  
  49. %
  50. %
  51. %
  52. /PGSEncoding 256 array def
  53. % duplicates: acute, quoteleft, quoteright
  54. % 000-007
  55. /.notdef        /dotlessi        /grave            /acute            /circumflex        /tilde            /breve            /dotaccent
  56. % 010-017
  57. /ring            /hungarumlaut    /ogonek            /caron            /.notdef        /.notdef        /.notdef        /.notdef
  58. % 020-027
  59. /quotedblbase    /quotesinglbase    /quotesingle    /quoteleft        /quoteright        /.notdef        /.notdef        /.notdef
  60. % 030-037
  61. /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef
  62. % 040-047
  63. /space            /exclam            /quotedbl        /numbersign        /dollar            /percent        /ampersand        /quoteright
  64. % 050-057
  65. /parenleft        /parenright        /asterisk        /plus            /comma            /hyphen            /period            /slash
  66. % 060-067
  67. /zero            /one            /two            /three            /four            /five            /six            /seven
  68. % 070-077
  69. /eight            /nine            /colon            /semicolon        /less            /equal            /greater        /question
  70. % 100-107
  71. /at                /A                /B                /C                /D                /E                /F                /G
  72. % 110-117
  73. /H                /I                /J                /K                /L                /M                /N                /O
  74. % 120-127
  75. /P                /Q                /R                /S                /T                /U                /V                /W
  76. % 130-137
  77. /X                /Y                /Z                /bracketleft    /backslash        /bracketright    /asciicircum    /underscore
  78. % 140-147
  79. /quoteleft        /a                /b                /c                /d                /e                /f                /g
  80. % 150-157
  81. /h                /i                /j                /k                /l                /m                /n                /o
  82. % 160-167
  83. /p                /q                /r                /s                /t                /u                /v                /w
  84. % 170-177
  85. /x                /y                /z                /braceleft        /bar            /braceright        /asciitilde        /.notdef
  86. % 200-207
  87. /perthousand    /florin            /notequal        /infinity        /lessequal        /greaterequal    /.notdef        /.notdef
  88. % 210-217
  89. /ellipsis        /endash            /emdash            /quotedblleft    /quotedblright    /guilsinglleft    /guilsinglright    /pi                
  90. % 220-227
  91. /fraction        /dagger            /daggerdbl        /trademark        /bullet            /fi                /fl                /Ydieresis        
  92. % 230-237
  93. /Lslash            /lslash            /OE                /oe                /Scaron            /scaron            /Zcaron            /zcaron            
  94. % 240-247
  95. /space            /exclamdown        /cent            /sterling        /currency        /yen            /brokenbar        /section
  96. % 250-257
  97. /dieresis        /copyright        /ordfeminine    /guillemotleft    /logicalnot        /minus            /registered        /macron
  98. % 260-267
  99. /degree            /plusminus        /twosuperior    /threesuperior    /acute            /mu                /paragraph        /periodcentered
  100. % 270-277
  101. /cedilla        /onesuperior    /ordmasculine    /guillemotright    /onequarter        /onehalf        /threequarters    /questiondown
  102. % 300-307
  103. /Agrave            /Aacute            /Acircumflex    /Atilde            /Adieresis        /Aring            /AE                /Ccedilla
  104. % 310-317
  105. /Egrave            /Eacute            /Ecircumflex    /Edieresis        /Igrave            /Iacute            /Icircumflex    /Idieresis
  106. % 320-327
  107. /Eth            /Ntilde            /Ograve            /Oacute            /Ocircumflex    /Otilde            /Odieresis        /multiply
  108. % 330-337
  109. /Oslash            /Ugrave            /Uacute            /Ucircumflex    /Udieresis        /Yacute            /Thorn            /germandbls
  110. % 340-347
  111. /agrave            /aacute            /acircumflex    /atilde            /adieresis        /aring            /ae                /ccedilla
  112. % 350-357
  113. /egrave            /eacute            /ecircumflex    /edieresis        /igrave            /iacute            /icircumflex    /idieresis
  114. % 360-367
  115. /eth            /ntilde            /ograve            /oacute            /ocircumflex    /otilde            /odieresis        /divide
  116. % 370-377
  117. /oslash            /ugrave            /uacute            /ucircumflex    /udieresis        /yacute            /thorn            /ydieresis
  118. PGSEncoding 0 256 getinterval astore pop
  119.  
  120. %
  121. % path constructors
  122. %
  123. % - N -
  124. /N/newpath ldef
  125.  
  126. % x y M -
  127. /M{scl moveto}bdef
  128.  
  129. % x y L -
  130. /L{scl lineto}bdef
  131.  
  132. % cx1 cy1 cx2 cy2 px2 py2 C -
  133. /C{scl 6 2 roll scl 6 2 roll scl 6 2 roll curveto}bdef
  134.  
  135. % cx cy rx ry ba ea slant twist A -
  136. /A{/twist xdef/slant xdef/eang xdef/bang xdef/yscl xdef/xscl xdef scl translate xscl yscl scale sclm 0 twist cos put
  137. sclm 1 twist sin put sclm 2 slant sin neg put sclm 3 slant cos put sclm concat 0 0 1 bang eang arc omatrix setmatrix}bdef
  138.  
  139. % cx cy rx ry ba ea slant twist AN -
  140. /AN{/twist xdef/slant xdef/eang xdef/bang xdef/yscl xdef/xscl xdef scl translate xscl yscl scale sclm 0 twist cos put
  141. sclm 1 twist sin put sclm 2 slant sin neg put sclm 3 slant cos put sclm concat 0 0 1 bang eang arcn omatrix setmatrix}bdef
  142.  
  143. % - CP -
  144. /CP{closepath}bdef
  145.  
  146. %
  147. % pattern fill operators
  148. %
  149. % - patternpath -
  150. /patternpath { %bdef
  151.   /mypatternfont findfont begin FontDict /ctm get setmatrix
  152.   currentdict setfont
  153.  
  154.   FontDict begin
  155.     FontMatrix concat
  156.     width 0 dtransform
  157.     round width div exch round width div exch
  158.     0 height dtransform
  159.     round height div exch
  160.     round height div exch
  161.     0 0 transform round exch round exch
  162.     ptm astore setmatrix
  163.     pathbbox
  164.     height div ceiling height mul 4 1 roll
  165.     width div ceiling width mul 4 1 roll
  166.     height div floor height mul 4 1 roll
  167.     width div floor width mul 4 1 roll
  168.     2 index sub height div ceiling cvi exch
  169.     3 index sub width div ceiling cvi exch
  170.     4 2 roll moveto
  171.     FontMatrix ptm invertmatrix pop
  172.     { %repeat
  173.       gsave
  174.       ptm concat
  175.       dup str length idiv {str show}repeat
  176.       dup str length mod str exch 0 exch getinterval show
  177.       grestore
  178.       0 height rmoveto
  179.     }repeat
  180.     pop
  181.   end end
  182. }bdef
  183.  
  184. % - patternfill -
  185. /patternfill { %bdef
  186.   gsave
  187.   1 setgray
  188.   fill
  189.   grestore
  190.  
  191.   gsave
  192.   clip patternpath
  193.   grestore
  194.   newpath
  195. }bdef
  196.  
  197. % - patterneofill -
  198. /patterneofill { %bdef
  199.   gsave
  200.   1 setgray
  201.   eofill
  202.   grestore
  203.  
  204.   gsave
  205.   eoclip patternpath
  206.   grestore
  207.   newpath
  208. }bdef
  209.  
  210. % - patternstroke -
  211. /patternstroke { %bdef
  212.   strokepath
  213.   gsave
  214.   1 setgray
  215.   eofill
  216.   grestore
  217.  
  218.   gsave
  219.   clip patternpath
  220.   grestore
  221.   newpath
  222. }bdef
  223.  
  224. % <pattern> P -
  225. /P {
  226.  /pattern xdef
  227.  /mypatternfont findfont begin
  228.  FontDict begin
  229.  true
  230.   0 1 patterncount 1 sub {
  231.    dup patterns exch get pattern eq
  232.       {0 1 str length 1 sub{str exch 2 index put}for pop pop false exit}
  233.    if
  234.    pop
  235.  }for
  236.  {
  237.    patterns patterncount pattern put
  238.     0 1 str length 1 sub {str exch patterncount put}for
  239.    /patterncount patterncount 1 add def
  240.  }if
  241.  end
  242.  end
  243. /FILL{patternfill}bdef
  244. /EOFILL{patterneofill}bdef
  245. /STROKE{patternstroke}bdef
  246. }bdef
  247.  
  248. /S{
  249. /FILL{fill}bdef
  250. /EOFILL{eofill}bdef
  251. /STROKE{stroke}bdef
  252. }bdef
  253.  
  254. %
  255. % gradient/radial/shape fill operators
  256. %
  257. /DOGRAD{
  258.  gsave cmatrix setmatrix flattenpath exec 
  259.  pathbbox /ury xdef /urx xdef /lly xdef /llx xdef
  260.  angle 0 lt{/angle angle 360 add def}if
  261.  angle 180 gt{/angle angle 180 sub def tc1 tc2 /tc1 xdef /tc2 xdef}if
  262.  angle 90 gt{ /quad {ury exch sub}bdef tc1 tc2 /tc1 xdef /tc2 xdef}{ /quad {lly add}bdef}ifelse
  263.  /l urx llx sub def
  264.  /w ury lly sub def
  265.  /v angle dup 90 gt{90 sub neg 90 add}if dup sin l mul exch cos w mul add 2 mul def
  266.  /d angle dup 90 gt{90 sub neg 90 add}if dup sin w mul exch cos l mul add def
  267.  /steps d 72 div currentscreen pop pop mul cvi 1 add dup 256 gt{pop 256}if def
  268.  /dd d steps div def
  269.  
  270.  0 1 steps
  271.  {
  272.   steps div dup /frac xdef ramp /rfrac xdef
  273.   tc2 0 get tc1 0 get sub rfrac mul tc1 0 get add
  274.   tc2 1 get tc1 1 get sub rfrac mul tc1 1 get add
  275.   tc2 2 get tc1 2 get sub rfrac mul tc1 2 get add
  276.   tc2 3 get tc1 3 get sub rfrac mul tc1 3 get add setcmykcolor
  277.  
  278.   newpath gsave
  279.   l frac mul llx add
  280.   w frac mul quad translate angle rotate 
  281.   dd 2 div neg v 2 div neg moveto
  282.   0 v rlineto dd 0 rlineto 0 v neg rlineto closepath
  283.   FILL grestore
  284.  }for
  285.  
  286.  grestore
  287. }bdef
  288.  
  289. %
  290. %
  291. /DORADIAL{
  292.  gsave cmatrix setmatrix flattenpath exec 
  293.  pathbbox /ury xdef /urx xdef /lly xdef /llx xdef
  294.  /xc llx urx add 2 div dx add def
  295.  /yc lly ury add 2 div dy add def
  296.  /radius llx xc sub abs dup mul sqrt lly yc sub abs dup mul sqrt add def
  297.  
  298.  /steps radius 72 div currentscreen pop pop mul cvi 1 add dup 256 gt{pop 256}if def
  299.  
  300.  steps -1 0
  301.  {
  302.   steps div dup /frac xdef ramp /rfrac xdef
  303.   tc2 0 get tc1 0 get sub rfrac mul tc1 0 get add
  304.   tc2 1 get tc1 1 get sub rfrac mul tc1 1 get add
  305.   tc2 2 get tc1 2 get sub rfrac mul tc1 2 get add
  306.   tc2 3 get tc1 3 get sub rfrac mul tc1 3 get add setcmykcolor
  307.   newpath xc yc radius frac mul 0 360 arc FILL
  308.  }for
  309.  
  310.  grestore
  311. }bdef
  312.  
  313. %
  314. %
  315. /DOSHAPE{
  316.  /steps 30 def
  317.  /fillproc xdef
  318.  
  319.  currentflat mark currentflat
  320.  {
  321.   {
  322.    dup setflat mark fillproc
  323.  
  324.    tc1 0 get tc1 1 get tc1 2 get tc1 3 get setcmykcolor
  325.    currentflat mark currentflat
  326.    {
  327.     dup setflat mark
  328.     {FILL}gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  329.    }loop
  330.    cleartomark setflat
  331.  
  332.    steps -1 0
  333.    {
  334.     steps div dup /frac xdef ramp /rfrac xdef
  335.     tc1 0 get tc2 0 get sub rfrac mul tc2 0 get add
  336.     tc1 1 get tc2 1 get sub rfrac mul tc2 1 get add
  337.     tc1 2 get tc2 2 get sub rfrac mul tc2 2 get add
  338.     tc1 3 get tc2 3 get sub rfrac mul tc2 3 get add setcmykcolor
  339.     []0 setdash xc 2 mul frac mul setlinewidth
  340.  
  341.     currentflat mark currentflat
  342.     {
  343.      dup setflat mark
  344.      {STROKE}gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  345.     }loop
  346.     cleartomark setflat
  347.  
  348.    }for
  349.   }
  350. %  gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  351.   gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {exit}if}{cleartomark exit}ifelse
  352.  }loop
  353.  cleartomark setflat
  354. }bdef
  355.  
  356. %
  357. % join miterlimit cap [dashpattern] width ST -
  358. %
  359. /ST {
  360.  setlinewidth 0 setdash setlinecap
  361.  2 div sin 1 exch div setmiterlimit
  362.  setlinejoin
  363. }bdef
  364.  
  365. % fill functions
  366. %
  367. % endfunc scale angle x y LNE -
  368. %
  369. /LNE {
  370.  scl translate rotate dup scale
  371.  load exec
  372.  omatrix setmatrix
  373. }bdef
  374.  
  375. %
  376. % screen spot functions
  377. %
  378. /SSNewDot {180 mul cos exch 180 mul cos add 2 div}bdef
  379. /SSDot {dup mul exch dup mul add 1.0 exch sub}bdef
  380. /SSRing {dup mul exch dup mul add 1.0 exch sub abs 1.0 exch sub}bdef
  381. /SSDonut {dup mul exch dup mul add sqrt .5 sub abs 1.0 exch sub}bdef
  382. /SSLine {exch pop abs}bdef
  383. /SSTriangle {2 exch sub exch abs 2 mul sub 3 div}bdef
  384. /SSPropeller {/y xdef /x xdef y x .001 add atan cvi 72 mod 72 sub abs 72 div y y mul x x mul add 1 exch sub add 2 div}bdef
  385.  
  386. %
  387. % fountain blend functions
  388. %
  389. /FBLinear {}bdef
  390. /FBInvLinear {1 exch sub}bdef
  391. /FBLog {9 mul 1 add log}bdef
  392. /FBInvLog {9 mul 1 add log 1 exch sub}bdef
  393. /FBSin {180 mul sin}bdef
  394. /FBInvSin {180 mul sin 1 exch sub}bdef
  395. /FBSaw {2 mul dup 1 gt {2 exch sub}if}bdef
  396. /FBInvSaw {2 mul dup 1 gt {2 exch sub}if 1 exch sub}bdef
  397.  
  398. %
  399. % line end functions
  400. %
  401. /LERound {0 0 moveto 0 0 .5 -90 90 arc closepath}bdef
  402. /LEArrow {0 0 moveto 0 2 lineto 6 0 lineto 0 -2 lineto closepath}bdef
  403. /LEArrow1 {0 0 moveto 0 2 lineto 6 0 lineto 0 -2 lineto closepath}bdef
  404. /LEArrow2 {0 0 moveto -2 2 lineto 6 0 lineto -2 -2 lineto closepath}bdef
  405. /LEArrow3 {6 0 moveto -3 0 2.31 300 60 arc closepath}bdef
  406. /LEArrow4 {-1 0 moveto -4 2 .5 240 60 arcn 0 0 .5 60 300 arcn -4 -2 .5 300 120 arcn closepath}bdef
  407. /LESpike1 {0 .5 moveto .5 2 lineto 1 .5 lineto 6 0 lineto 1 -.5 lineto .5 -2 lineto 0 -.5 lineto closepath}bdef
  408. /LESpike2 {0 .5 moveto 2 2 lineto 6 0 lineto 2 -2 lineto 0 -.5 lineto closepath}bdef
  409. /LEFeather1 {-2 0 moveto 0 2 lineto 6 2 lineto 4 0 lineto 6 -2 lineto 0 -2 lineto closepath}bdef
  410. /LEFeather2 {0 -2 moveto 0 0 2 270 90 arcn 6 0 2 90 270 arc closepath}bdef
  411. /LEBox {-2 0 moveto -2 2 lineto 2 2 lineto 2 -2 lineto -2 -2 lineto closepath}bdef
  412. /LEDiamond {-2 0 moveto 0 2 lineto 2 0 lineto 0 -2 lineto closepath}bdef
  413. /LEBall {0 0 moveto 0 0 2 360 0 arcn closepath}bdef
  414. /LEEllipse {2 1 scale 0 0 moveto 0 0 2 360 0 arcn closepath}bdef
  415.  
  416. %
  417. % freq angle spot SS -
  418. %
  419. /SS {
  420.  load setscreen
  421. }bdef
  422.  
  423. %
  424. % text prototypes
  425. %
  426. % (string) F1 -
  427. % (string) kernamt F2 -
  428. % (string) skernamt F3 -
  429. % (string) skernamt kernamt F4 -
  430. %
  431.  
  432. %
  433. % c m y k CMYK -
  434. %
  435. /CMYK {
  436.  setcmykcolor
  437.  
  438.  /FP{fill}bdef
  439.  /EP{eofill}bdef
  440.  /SP{stroke}bdef
  441.  
  442.  /F1{show}bdef
  443.  /F2{exch 0 exch ashow}bdef
  444.  /F3{exch 0 exch 32 exch widthshow}bdef
  445.  /F4{0 exch 32 exch 0 6 -1 roll awidthshow}bdef
  446.  
  447.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  448.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  449.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  450.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  451. }bdef
  452.  
  453. %
  454. % angle /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKGRAD -
  455. %
  456. /CMYKGRAD{
  457.  /tc2 xdef
  458.  /tc1 xdef
  459.  /ramp exch ldef
  460.  /angle xdef
  461.  
  462.  /FP{{clip} DOGRAD}bdef
  463.  /EP{{eoclip} DOGRAD}bdef
  464.  /SP{strokepath {clip} DOGRAD}bdef
  465.  
  466.  /F1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto}for}bdef
  467.  /F2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  468.  /F3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  469.  /F4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  470.  
  471.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  472.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  473.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  474.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  475.  
  476. }bdef
  477.  
  478. %
  479. % dx dy /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKRADIAL -
  480. %
  481. /CMYKRADIAL{
  482.  /tc2 xdef
  483.  /tc1 xdef
  484.  /ramp exch ldef
  485.  /dy xdef
  486.  /dx xdef
  487.  
  488.  /FP{{clip} DORADIAL}bdef
  489.  /EP{{eoclip} DORADIAL}bdef
  490.  /SP{strokepath {clip} DORADIAL}bdef
  491.  
  492.  /F1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto}for}bdef
  493.  /F2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  494.  /F3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  495.  /F4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  496.  
  497.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  498.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  499.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  500.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  501.  
  502. }bdef
  503.  
  504. %
  505. % inset /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKSHAPE -
  506. %
  507. /CMYKSHAPE {
  508.  /tc2 xdef
  509.  /tc1 xdef
  510.  /ramp exch ldef
  511.  /xc xdef
  512.  
  513.  /FP{{clip} DOSHAPE}bdef
  514.  /EP{{eoclip} DOSHAPE}bdef
  515.  /SP{strokepath {clip} DOSHAPE}bdef
  516.  
  517.  /F1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto}for}bdef
  518.  /F2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  519.  /F3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  520.  /F4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  521.  
  522.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  523.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  524.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  525.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  526. }bdef
  527.  
  528.  
  529. /installcolor {
  530.  dup type /stringtype eq {pop dangle}if exch dup type /stringtype eq {pop dfreq}if exch /dspot load setscreen
  531.  
  532.  /sepmode xdef
  533.  
  534.  sepmode 1 eq {
  535.   /setcmykcolor{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll}repeat setrgbcolor pop}bdef
  536.   /setgray /SG load def
  537.  }if
  538.  
  539.  sepmode 2 eq {
  540.   systemdict /setcmykcolor known not {/setcmykcolor {1 sub 4 1 roll 3 {3 index add neg dup 0 lt{pop 0}if 3 1 roll}repeat setrgbcolor pop}bdef}if
  541.   /setgray /SG load def
  542.  }if
  543.  
  544.  sepmode 3 eq {
  545.   /sepcolor xdef
  546.   sepcolor 0 get 0 ne {/setcmykcolor {pop pop pop 1 exch sub SG}bdef /setgray {pop 1 SG}bdef}if
  547.   sepcolor 1 get 0 ne {/setcmykcolor {pop pop 1 exch sub SG pop}bdef /setgray {pop 1 SG}bdef}if
  548.   sepcolor 2 get 0 ne {/setcmykcolor {pop 1 exch sub SG pop pop}bdef /setgray {pop 1 SG}bdef}if
  549.   sepcolor 3 get 0 ne {/setcmykcolor {1 exch sub SG pop pop pop}bdef /setgray /SG load def}if
  550.  }if
  551.  
  552.  sepmode 4 eq {
  553.   /sepcolor xdef
  554.   /setcmykcolor {
  555.    sepcolor 3 get eq exch
  556.    sepcolor 2 get eq and exch
  557.    sepcolor 1 get eq and exch
  558.    sepcolor 0 get eq and {0 SG}{1 SG}ifelse}bdef
  559.   sepcolor 3 get 1 eq sepcolor 2 get 0 eq and sepcolor 1 get 0 eq and sepcolor 0 get 0 eq and {/setgray /SG load def}{/setgray {pop 1 SG}bdef}ifelse
  560.  }if
  561.  
  562.  currentscreen /cspot xdef /cangle xdef /cfreq xdef
  563. }bdef
  564.  
  565. %
  566. % #copies BEGINDOCUMENT -
  567. %
  568. /BeginDocument {
  569.  /#copies xdef
  570.  
  571.   7 dict begin
  572.     /FontDict 12 dict def
  573.     FontDict begin
  574.       /key /mypatternfont def
  575.       /patterns 256 array def
  576.       /patterncount 0 def
  577.       /char 0 def
  578.       /mtx [300 72 div 0 0 300 72 div 0 0] matrix invertmatrix def
  579.       /height 30 def
  580.       /width 30 def
  581.       /ctm matrix currentmatrix def
  582.       /ptm matrix identmatrix def
  583.       /str 32 string def
  584.     end
  585.     /FontBBox [0 0 FontDict /width get FontDict /height get] def
  586.     /FontMatrix FontDict /mtx get def
  587.     /Encoding 256 array 0 1 255 {1 index exch dup 3 string cvs cvn put}for def
  588.     /FontType 3 def
  589.     /BuildChar { %def
  590.       exch begin
  591.       FontDict begin
  592.       /char xdef
  593.        width 0 0 0 width height setcachedevice
  594.       width height scale 8 8 true [8 0 0 -8 0 8] {patterns char get}imagemask
  595.       end end
  596.     }def
  597.     FontDict /key get currentdict definefont pop
  598.   end
  599.  
  600.  /dmatrix dmatrix currentmatrix def
  601.  currentscreen /dspot xdef /dangle xdef /dfreq xdef
  602.  
  603. }bdef
  604.  
  605. %
  606. % /newfontname /fontname RE -
  607. %
  608. /RE {
  609.  findfont dup length dict begin { %forall
  610.   1 index /FID ne {def}{pop pop}ifelse
  611.  }forall
  612.  /Encoding PGSEncoding def
  613.  /FontName 1 index def
  614.  currentdict definefont pop
  615.  end
  616. }bdef
  617.  
  618. %
  619. % /fontname xscale yscale F -
  620. %
  621. /f {
  622.  /yscale xdef /xscale xdef
  623.  findfont [xscale 0 0 yscale 0 0] makefont setfont
  624. }bdef
  625.  
  626. %
  627. % - ENDOCUMENT -
  628. %
  629. /EndDocument {
  630. }bdef
  631.  
  632. %
  633. % [sepcolor] sepmode freq/(DEFAULT) angle/(DEFAULT) tilew tileh landscape scaleh scalex paperw paperh BEGINTILE -
  634. %
  635. /BeginTile {
  636.  2 div exch 2 div exch translate
  637.  /tilescaley xdef /tilescalex xdef tilescalex tilescaley scale
  638.  {90 rotate} if
  639.  -2 div exch -2 div exch translate
  640.  
  641.  installcolor
  642.  
  643.  /cmatrix cmatrix currentmatrix def
  644. }bdef
  645.  
  646. %
  647. % angle cx cy cropmark -
  648. %
  649. /cropmark {
  650.   gsave translate 1 tilescalex div 1 tilescaley div scale rotate
  651.   .3 setlinewidth newpath
  652.   bh 5 add 0 moveto 20 0 rlineto
  653.   0 bv 5 add moveto 0 20 rlineto
  654.   stroke grestore
  655. }bdef
  656.  
  657. %
  658. % dx dy cx cy regmark -
  659. %
  660. /regmark {
  661.   gsave translate 1 tilescalex div 1 tilescaley div scale translate
  662.   .3 setlinewidth newpath
  663.   10 0 moveto 0 0 10 0 360 arc
  664.   1 SG fill
  665.   8 0 moveto 0 0 8 0 360 arc
  666.   -10 0 moveto 10 0 lineto 0 -10 moveto 0 10 lineto
  667.   0 SG stroke
  668.   4 0 moveto 0 0 4 0 360 arc
  669.   fill
  670.   -4 0 moveto 4 0 lineto 0 -4 moveto 0 4 lineto
  671.   1 SG stroke
  672.   grestore
  673. }bdef
  674.  
  675. %
  676. % dx dy cx cy slurgauge -
  677. %
  678. /slurgauge {
  679.   gsave translate 1 tilescalex div 1 tilescaley div scale translate
  680.   .3 setlinewidth newpath
  681.   0 0 10 0 360 arc
  682.   1 SG fill
  683.   0 0 10 0 360 arc
  684.   0 SG stroke
  685.   36 { 1 0 moveto 0 0 10 -2.5 2.5 arc fill 10 rotate}repeat
  686.   grestore
  687. }bdef
  688.  
  689.  
  690. /boxit {newpath moveto 14 0 rlineto 0 -14 rlineto -14 0 rlineto closepath}def
  691.  
  692. %
  693. % angle dx dy cx cy colorstrip -
  694. %
  695. /colorstrip {
  696.   gsave translate 1 tilescalex div 1 tilescaley div scale translate rotate
  697.  
  698.   /Courier findfont 6 scalefont setfont
  699.  
  700.   sepmode 1 eq {
  701.     0 8 translate
  702.     0 1 9 {dup 15 mul 0 boxit 10 div SG fill}for
  703.    }if
  704.  
  705.   sepmode 2 eq sepmode 3 eq or {
  706.     gsave 320 15 translate
  707.     0 0 boxit .5 .41 .41 0 setcmykcolor fill
  708.     15 0 boxit 0 0 0 .5 setcmykcolor fill
  709.     30 0 boxit 1 1 0 0 setcmykcolor fill
  710.     45 0 boxit 1 0 1 0 setcmykcolor fill
  711.     60 0 boxit 0 1 1 0 setcmykcolor fill
  712.     75 0 boxit 1 1 1 0 setcmykcolor fill
  713.     1 SG
  714.     33 -6 moveto (CM) show
  715.     48 -6 moveto (CY) show
  716.     63 -6 moveto (MY) show
  717.     77 -6 moveto (CMY) show
  718.     grestore
  719.  
  720.  
  721.     0 0 0 1 setcmykcolor -6 9 moveto (K) show
  722.     0 1 9 {dup 15 mul 15 boxit 10 div 0 0 0 4 -1 roll setcmykcolor fill}for
  723.  
  724.     1 0 0 0 setcmykcolor -6 -6 moveto (C) show
  725.     0 1 9 {dup 15 mul 0 boxit 10 div 0 0 0 setcmykcolor fill}for
  726.  
  727.     0 1 0 0 setcmykcolor 154 9 moveto (M) show
  728.     0 1 9 {dup 15 mul 160 add 15 boxit 10 div 0 exch 0 0 setcmykcolor fill}for
  729.  
  730.     0 0 1 0 setcmykcolor 154 -6 moveto (Y) show
  731.     0 1 9 {dup 15 mul 160 add 0 boxit 10 div 0 0 3 -1 roll 0 setcmykcolor fill}for
  732.  
  733.    }if
  734.  
  735.   sepmode 4 eq {
  736.     320 0 translate
  737.     0 1 9 {dup 15 mul 0 boxit 10 div SG fill}for
  738.    }if
  739.  
  740.   grestore
  741. }def
  742.  
  743. %
  744. % title1 title2 tilew tileh PRINTERSMARKS -
  745. %
  746. /PrintersMarks {
  747.  /tileh xdef
  748.  /tilew xdef
  749.  /title2 xdef
  750.  /title1 xdef
  751.  
  752.  gsave 0 SG [] 0 setdash 0 setlinejoin 0 setlinecap
  753.  
  754.  180 0 0 cropmark
  755.  270 tilew 0 cropmark
  756.  0 tilew tileh cropmark
  757.  90 0 tileh cropmark
  758.  
  759.  0 15 bv add tilew 2 div tileh regmark
  760.  0 -15 bv sub tilew 2 div 0 regmark
  761.  
  762.  -15 bh sub -15 bv sub 0 0 slurgauge
  763.  15 bh add 15 bv add tilew tileh slurgauge
  764.  
  765.   gsave 1 tilescalex div 1 tilescaley div scale -15 bh sub 8 translate 90 rotate
  766.   /Courier findfont 8 scalefont setfont
  767.   0 0 moveto title1 show
  768.   0 -8 moveto title2 show (  ) show
  769.   currentscreen pop exch 20 string cvs show ( lpi  ) show
  770.   20 string cvs show (\312  ) show
  771.   tilescalex 100 mul 20 string cvs show (%) show
  772.   tilescaley tilescalex ne {(,) show tilescaley 100 mul 20 string cvs show (%) show}if
  773.   grestore
  774.  
  775.  90 bh 15 add 15 tilew 0 colorstrip
  776.  grestore
  777. }bdef
  778.  
  779. %
  780. % [sepcolor] sepmode freq/(DEFAULT) angle/(DEFAULT) title left top right bottom THUMBNAILMARKS -
  781. %
  782. /ThumbnailMarks {
  783.  /tiley2 xdef
  784.  /tilex2 xdef
  785.  /tiley1 xdef
  786.  /tilex1 xdef
  787.  /title1 xdef
  788.  
  789.  cmatrix setmatrix
  790.  .5 SG 6 setlinewidth
  791.  newpath
  792.  tilex1 3 add tiley2 3 sub moveto
  793.  tilex2 3 add tiley2 3 sub lineto
  794.  tilex2 3 add tiley1 3 sub lineto stroke
  795.  
  796.  0 SG [] 0 setdash .3 setlinewidth 0 setlinejoin 0 setlinecap
  797.  newpath tilex1 tiley1 moveto tilex2 tiley1 lineto tilex2 tiley2 lineto tilex1 tiley2 lineto closepath stroke
  798.  
  799.  gsave tilex1 tilex2 add 2 div tiley2 translate 1 tilescalex div 1 tilescaley div scale -2 -6 bv sub translate
  800.  /Courier findfont 6 scalefont setfont
  801.  0 0 moveto title1 show
  802.  grestore
  803.  
  804.  installcolor
  805. }bdef
  806.  
  807. %
  808. % - ENDTILE -
  809. %
  810. /EndTile {
  811.  dmatrix setmatrix
  812. }bdef
  813.  
  814. %
  815. % - BEGINCLIP -
  816. %
  817. /BeginClip {/PGSClipSave save def clip}bdef
  818.  
  819. %
  820. % - ENDCLIP -
  821. %
  822. /EndClip {PGSClipSave restore}bdef
  823.  
  824. %
  825. % xscale yscale xoffset yoffset pixelw pixelh bitsperpixel BEGINBITMAP -
  826. %
  827. /BeginBitmap {
  828.  /bpp xdef /h xdef /w xdef
  829.  scl translate scale save /picstr 8 bpp idiv dup w add 1 sub exch idiv string def
  830.  w h bpp [w 0 0 h neg 0 h] {currentfile picstr readhexstring pop}bind image
  831. }bdef
  832.  
  833. %
  834. % xscale yscale xoffset yoffset pixelw pixelh bitsperpixel BEGINRGBBITMAP -
  835. %
  836. /BeginRGBBitmap {
  837.  /bpp xdef /h xdef /w xdef
  838.  scl translate scale save /picstr 8 bpp idiv dup w 3 mul add 1 sub exch idiv string def
  839.  w h bpp [w 0 0 h neg 0 h] {currentfile picstr readhexstring pop}bind false 3 colorimage
  840. }bdef
  841.  
  842. %
  843. % - ENDBITMAP -
  844. %
  845. /EndBitmap {restore omatrix setmatrix}bdef
  846.  
  847. %
  848. % xscalex yscale xoffset yoffset BEGINEPS -
  849. %
  850. /BeginEPS {
  851.  scl translate scale translate
  852.  /PGSEPSSave save def /showpage {}bdef
  853.  newpath [] 0 setdash 1 setlinewidth 0 setgray
  854. }bdef
  855.  
  856. %
  857. % - ENDEPS -
  858. %
  859. /EndEPS {PGSEPSSave restore}bdef
  860.  
  861. end
  862. %%EndProlog
  863.